From 5f431baaaa16f58e6242e8213c3b39ee591f21f6 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc" Date: Fri, 4 Oct 2024 18:12:20 -0500 Subject: [PATCH] Apply the route_prefix setting to the static assets --- src/pgwui_common/pgwui_common.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pgwui_common/pgwui_common.py b/src/pgwui_common/pgwui_common.py index 801326e..96a4920 100644 --- a/src/pgwui_common/pgwui_common.py +++ b/src/pgwui_common/pgwui_common.py @@ -67,9 +67,10 @@ def includeme(config): ''' config.include('pyramid_mako') config.include('pyramid_beaker') - config.add_static_view( - 'static/pgwui_common', - 'pgwui_common:static/', - cache_max_age=3600) + with config.route_prefix_context(settings['pgwui'].get('route_prefix')): + config.add_static_view( + 'static/pgwui_common', + 'pgwui_common:static/', + cache_max_age=3600) establish_settings(config) config.scan() -- 2.34.1